package day05;
import java.util.Scanner;
public class Additiong {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        int score=0;
        for(int i=1;i<=10;i++){
            int a =(int)(Math.random()*100);
            int b =(int)(Math.random()*100);
            int c=a+b;
            System.out.print("("+i+")"+a+"+"+b+"=");
            int answer=scan.nextInt();
            if(answer==c){
                System.out.println("答对了+10分！");
                score+=10;
            }else{
                System.out.println("答错了，不加分！");
            }
        }
        if(score==100){
            System.out.println("!!!!!!!!!恭喜你获得100分！！！！！！！！！");
        }else{
            System.out.println("最终得分为："+score+"分!");
        }

    }
}
